<script charset="utf-8" src="jslib/kindeditor/kindeditor-min.js"></script>
<script type="text/javascript">
var editor;
$(function() {
	KindEditor.basePath = 'jslib/kindeditor/';
	editor = KindEditor.create('textarea[name="describe"]',{
		afterChange: function (e) { this.sync(); },
		wellFormatMode : false
	});
});

function initEditCandidate(canId) {
	$.getJSON('candidateAction!getCandidate.action', {canId : canId}, function(data) {
		$("#moduls_fun_editCandidate_editForm input[name=canId]").val(data.canId);
		$("#moduls_fun_editCandidate_editForm input[name=username]").val(data.username);
		$("#moduls_fun_editCandidate_editForm input[name=job]").val(data.job);
		$("#moduls_fun_editCandidate_editForm select[id=catId]").combobox('setValue', data.catId);
		$("#moduls_fun_editCandidate_editForm input[name=pictureFileName]").val(data.pictureFileName);
		$("#moduls_fun_editCandidate_editForm input[name=infoFileName]").val(data.infoFileName);
		editor.insertHtml(data.describe);
	});
}
</script>
<div align="center">
<br/>
	<form id="moduls_fun_editCandidate_editForm" method="post" enctype="multipart/form-data">
	<input type="hidden" name="canId">
	<input type="hidden" name="pictureFileName">
	<input type="hidden" name="infoFileName">
		<table class="tableForm">
			<tr>
				<th style="width: 100px;font-size: 12px; font-weight: normal;">姓名</th>
				<td><input name="username" class="easyui-validatebox" data-options="required:true" />
				</td>
				<th style="width: 100px;font-size: 12px; font-weight: normal;"></th>
				<td></td>
			</tr>
			<tr>
				<th style="width: 60px;font-size: 12px; font-weight: normal;">职务</th>
				<td><input name="job" class="easyui-validatebox" data-options="required:true" /></td>
				<th style="width: 60px;font-size: 12px; font-weight: normal;">评选种类</th>
				<td><select id="catId" name="catId" class="easyui-combobox" data-options="valueField:'catId', textField:'name', url:'categoryAction!query.action'" style="width:200px;">
				</select>
				</td>
			</tr>	
			<tr>
				<th style="width: 100px;font-size: 12px; font-weight: normal;">头像</th>
				<td><input type="file" name="picture">
				</td>
				<th style="width: 100px;font-size: 12px; font-weight: normal;">材料</th>
				<td><input type="file" name="info"></td>
			</tr>		
		</table>
		<div style="height: 30px;"></div>
		<div><div style="text-align: left;width:760px;">描述</div>
		<textarea name="describe" style="width:760px;height:400px;visibility:hidden;"></textarea>
		</div>
	</form>
</div>